const express = require("express");
const router = express.Router();

const quoteController = require("../controllers/quoteController");

// 获取单个名言
router.get("/", (req, res) => {
  quoteController.getOneQuote(req, res);
});

// 创建名言
router.post("/", (req, res) => {
  quoteController.createQuote(req, res);
});

// 删除名言
router.delete("/:id", (req, res) => {
  quoteController.deleteQuote(req, res);
});

// 获取全部名言
router.get("/all", (req, res) => {
  quoteController.getAllQuote(req, res);
});

module.exports = router;
